<?php if (!defined('THINK_PATH')) exit(); /*a:4:{s:89:"C:\phpStudy\PHPTutorial\WWW\P201802\fly\public/../application/index\view\index\index.html";i:1532593486;s:74:"C:\phpStudy\PHPTutorial\WWW\P201802\fly\application\index\view\monban.html";i:1531212748;s:79:"C:\phpStudy\PHPTutorial\WWW\P201802\fly\application\index\view\public\cate.html";i:1530760646;s:78:"C:\phpStudy\PHPTutorial\WWW\P201802\fly\application\index\view\public\hot.html";i:1530759152;}*/ ?>
<!DOCTYPE html>
<html>
    
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
        <title><?php echo $title; ?> - <?php echo config('site.name'); ?></title>
        <link rel="stylesheet" href="//at.alicdn.com/t/font_24081_dddajmj0coc4n29.css">
        <link rel="stylesheet" href="/static/layui/css/layui.css?v=<?php echo config('site.v'); ?>7">
        <link rel="stylesheet" href="/static/index/css/global.css?v=<?php echo config('site.v'); ?> charset="utf-8">
        <script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js"></script>
        <script src="/static/layui/layui.js?v=<?php echo config('site.v'); ?>"></script>
    </head>
    <body>
        <div class="fly-header layui-bg-black">
            <div class="layui-container">
                <a class="fly-logo" href="/">
                    <img src="/static/index/images/logo.png?v=<?php echo config('site.v'); ?>" alt="layui"></a>
                <ul class="layui-nav fly-nav layui-hide-xs">
                    <li class="layui-nav-item">
                        <a href="/">
                            <i class="iconfont icon-jiaoliu"></i>交流</a>
                    </li>
                    <li class="layui-nav-item">
                        <a href="javascript:;">
                            <i class="iconfont icon-chanpin" style="top: 1px;"></i>专区</a>
                        <dl class="layui-nav-child fly-nav-child">
                            <dd>
                                <a href="/vipclub/list/layuiadmin/">layuiAdmin</a></dd>
                            <hr>
                            <dd>
                                <a href="/vipclub/list/layim/">LayIM</a></dd>
                        </dl>
                        <span class="layui-badge-dot" style="margin: -5px 10px 0; right: 0;"></span>
                    </li>
                    <li class="layui-nav-item">
                        <a href="http://www.layui.com/">
                            <i class="iconfont icon-ui"></i>框架</a>
                    </li>
                </ul>
                <?php if(session('uid')): ?>
                <ul class="layui-nav fly-nav-user">
                    <li class="layui-nav-item">
                        <a class="fly-nav-avatar" href="<?php echo url('index/user/index'); ?>" id="LAY_header_avatar">
                            <cite class="layui-hide-xs"><?php echo session('nickname'); ?></cite>
                            <img src="/<?php echo session('face'); ?>">
                            <span class="layui-nav-more"></span>
                        </a>
                        <dl class="layui-nav-child layui-anim layui-anim-upbit">
                            <dd>
                                <a href="<?php echo url('index/user/index'); ?>">
                                    <i class="layui-icon"></i>用户中心</a></dd>
                            <dd>
                                <a href="<?php echo url('index/user/set'); ?>">
                                    <i class="layui-icon"></i>基本设置</a></dd>
                            <hr>
                            <dd>
                                <a href="<?php echo url('index/user/msg'); ?>">
                                    <i class="iconfont icon-tongzhi" style="top: 4px;"></i>我的消息</a>
                            </dd>
                            <dd>
                                <a href="<?php echo url('index/user/home'); ?>">
                                    <i class="layui-icon" style="margin-left: 2px; font-size: 22px;"></i>我的主页</a></dd>
                            <hr style="margin: 5px 0;">
                            <dd>
                                <a href="<?php echo url('index/login/loginout'); ?>" style="text-align: center;">退出</a></dd>
                        </dl>
                    </li>
                </ul>
                <?php else: ?>
                <ul class="layui-nav fly-nav-user">
                    <li class="layui-nav-item">
                        <a class="iconfont icon-touxiang layui-hide-xs" href="/user/login/"></a>
                    </li>
                    <li class="layui-nav-item">
                        <a href="<?php echo url('index/login/index'); ?>">登入</a></li>
                    <li class="layui-nav-item">
                        <a href="<?php echo url('index/reg/index'); ?>">注册</a></li>
                    <li class="layui-nav-item layui-hide-xs">
                        <a href="<?php echo url('index/login/qq'); ?>"  title="QQ登入" class="iconfont icon-qq"></a>
                    </li>
                    <li class="layui-nav-item layui-hide-xs">
                        <a href="/app/weibo/" onclick="layer.msg('正在通过微博登入', {icon:16, shade: 0.1, time:0})" title="微博登入" class="iconfont icon-weibo"></a>
                    </li>
                </ul>
                <?php endif; ?>
            </div>
        </div>
        <div class="layui-hide-xs">
    <div class="fly-panel fly-column">
        <div class="layui-container">
            <ul class="layui-clear">
                <li class="layui-hide-xs ">
                    <a href="/">首页</a>
                </li>
                <?php if(is_array($category) || $category instanceof \think\Collection || $category instanceof \think\Paginator): $i = 0; $__LIST__ = $category;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$cate): $mod = ($i % 2 );++$i;?>
                <li class="layui-hide-xs ">
                    <a href="<?php echo url('index/index/index',['cid'=>$cate['cid']]); ?>"><?php echo $cate['cname']; ?></a>
                </li>
                <?php endforeach; endif; else: echo "" ;endif; ?>
            </ul>
            <div class="fly-column-right layui-hide-xs">
                <span class="fly-search LAY_search">
                    <i class="layui-icon">&#xe615;</i></span>
                <a href="<?php echo url('index/jie/add'); ?>" class="layui-btn">发表新帖</a></div>
            <div class="layui-hide-sm layui-show-xs-block" style="margin-top: -10px; padding-bottom: 10px; text-align: center;">
                <a href="<?php echo url('index/jie/add'); ?>" class="layui-btn">发表新帖</a></div>
        </div>
    </div>
</div>
<div class="layui-container">
<div class="layui-row layui-col-space15">
    <div class="layui-col-md8 layui-anim layui-anim-scale">
        <?php if(empty(input(''))): ?>
        <div class="fly-panel">
            <div class="fly-panel-title fly-filter">
                <a>置顶</a>
                <a href="#signin" class="layui-hide-sm layui-show-xs-block fly-right" id="LAY_goSignin" style="color: #FF5722;">去签到</a></div>
            <ul class="fly-list">
                <?php if(is_array($topQues) || $topQues instanceof \think\Collection || $topQues instanceof \think\Paginator): $i = 0; $__LIST__ = $topQues;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$row): $mod = ($i % 2 );++$i;?>
                <li>
                    <a href="<?php echo url('index/user/home',['uid'=>$row['uid']]); ?>" class="fly-avatar">
                        <img class="layui-anim layui-anim-rotate layui-anim-loop" src="/<?php echo $row['face']; ?>" alt="Violet_Ice紫冰"></a>
                    <h2>
                        <a class="layui-badge"><?php echo $row['cname']; ?></a>
                        <a href="<?php echo url('index/jie/index',['qid'=>$row['qid']]); ?>"><?php echo $row['title']; ?></a></h2>
                    <div class="fly-list-info">
                        <a href="/u/10115784" link>
                            <cite><?php echo $row['nickname']; ?></cite>
                            <i class="layui-badge fly-badge-vip">VIP4</i></a>
                        <span><?php echo Ftime($row['ctime']); ?></span>
                        <span class="fly-list-kiss layui-hide-xs" title="悬赏飞吻">
                            <i class="iconfont icon-kiss"></i><?php echo $row['kiss']; ?></span>
                        <?php if($row['status']): ?>
                        <span class="layui-badge fly-badge-accept">已结</span>
                        <?php endif; ?>
                        <span class="fly-list-nums">
                            <i class="iconfont icon-pinglun1" title="回答"></i><?php echo $row['reply_num']; ?></span>
                    </div>
                    <div class="fly-list-badge">
                        <?php if($row['is_good']): ?>
                        <span class="layui-badge layui-bg-red">精帖</span></div>
                        <?php endif; ?>
                </li>
                <?php endforeach; endif; else: echo "" ;endif; ?>
            </ul>
        </div>
        <?php endif; ?>
        <div class="fly-panel" style="margin-bottom: 0;">
            <div class="fly-panel-title fly-filter">
                <a href="<?php echo url('index/index/index'); ?>" class="layui-this">综合</a>
                <span class="fly-mid"></span>
                <a href="<?php echo url('index/index/index',array_merge(input(),['status'=>0])); ?>">未结</a>
                <span class="fly-mid"></span>
                <a href="<?php echo url('index/index/index',array_merge(input(),['status'=>1])); ?>">已结</a>
                <span class="fly-mid"></span>
                <a href="<?php echo url('index/index/index',array_merge(input(),['is_good'=>1])); ?>">精华</a></div>
            <ul class="fly-list">
                <?php if(is_array($allQues) || $allQues instanceof \think\Collection || $allQues instanceof \think\Paginator): $i = 0; $__LIST__ = $allQues;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$row): $mod = ($i % 2 );++$i;?>
                <li>
                    <a href="<?php echo url('index/user/home',['uid'=>$row['uid']]); ?>" class="fly-avatar">
                        <img src="/<?php echo $row['face']; ?>" alt="Violet_Ice紫冰"></a>
                    <h2>
                        <a class="layui-badge"><?php echo $row['cname']; ?></a>
                        <a href="<?php echo url('index/jie/index',['qid'=>$row['qid']]); ?>"><?php echo $row['title']; ?></a></h2>
                    <div class="fly-list-info">
                        <a href="/u/10115784" link>
                            <cite><?php echo $row['nickname']; ?></cite>
                            <i class="layui-badge fly-badge-vip">VIP4</i></a>
                        <span><?php echo Ftime($row['ctime']); ?></span>
                        <span class="fly-list-kiss layui-hide-xs" title="悬赏飞吻">
                            <i class="iconfont icon-kiss"></i><?php echo $row['kiss']; ?></span>
                        <?php if($row['status']): ?>
                        <span class="layui-badge fly-badge-accept">已结</span>
                        <?php endif; ?>
                        <span class="fly-list-nums">
                            <i class="iconfont icon-pinglun1" title="回答"></i><?php echo $row['reply_num']; ?></span>
                    </div>
                    <div class="fly-list-badge">
                        <?php if($row['is_good']): ?>
                        <span class="layui-badge layui-bg-red">精帖</span></div>
                        <?php endif; ?>
                </li>
                <?php endforeach; endif; else: echo "" ;endif; ?>
            </ul>
            <style type="text/css">
                .pagination{
                    padding: 20px;
                }
                .pagination li{
                    display: inline-block;
                    padding: 5px 10px;
                    margin-right: 10px;
                    border: 1px solid #06978A;
                }
                .pagination li.active{
                    background: #06978A;
                    color: #fff;
                }
            </style>
            <div style="text-align: center">
                <?php echo $allQues->render(); ?>
            </div>
        </div>
    </div>
    <div class="layui-col-md4 layui-anim layui-anim-up">
        <div class="fly-panel">
            <h3 class="fly-panel-title">温馨通道</h3>
            <ul class="fly-panel-main fly-list-static">
                <li>
                    <a name="signin"></a>
                    <a href="http://fly.layui.com/case/2018/" target="_blank">layui 案例平台，发现更广泛的生态</a></li>
                <li>
                    <a href="http://fly.layui.com/jie/4281/" target="_blank">layui 的 GitHub 及 Gitee (码云) 仓库，欢迎Star</a></li>
                <li>
                    <a href="http://fly.layui.com/jie/5366/" target="_blank">layui 常见问题的处理和实用干货集锦</a></li>
                <li>
                    <a href="http://fly.layui.com/jie/13435/" target="_blank">关于 Fly 社区飞吻的消耗与增加</a></li>
                <li>
                    <a href="http://www.layui.com/template/fly/" target="_blank">下载“Fly社区”页面模板：Fly Template</a></li>
            </ul>
        </div>
        <div class="fly-panel fly-signin">
            <div class="fly-panel-title">签到
                <i class="fly-mid"></i>
                <a href="javascript:;" class="fly-link" id="LAY_signinHelp">说明</a>
                <i class="fly-mid"></i>
                <a href="javascript:;" class="fly-link" id="LAY_signinTop">活跃榜
                    <span class="layui-badge-dot"></span></a>
                <?php if($signInfo['login']): ?>
                <span class="fly-signin-days">已连续签到<cite><?php echo $signInfo['num']; ?></cite>天</span>
                <?php endif; ?>
            </div>
            <div class="fly-panel-main fly-signin-main">
                
                <?php if($signInfo['today']): ?>
                <button class="layui-btn layui-btn-disabled">今日已签到</button><span>获得了<cite><?php echo $signInfo['kiss']; ?></cite>飞吻</span>
                <?php else: ?>
                    <button class="layui-btn layui-btn-danger" id="LAY_signin">今日签到</button>
                    <?php if($signInfo['login']): ?>
                    <span>可获得<cite><?php echo $signInfo['kiss']; ?></cite>飞吻</span>
                    <?php endif; endif; ?>
            </div>
        </div>
        <div class="fly-panel">
            <div class="fly-panel-title">钻级赞助商
                <span class="fly-mid"></span>
                <a href="/jie/15697/" class="fly-link fly-joinad    ">我要加入</a></div>
            <div class="fly-panel-main" style="padding: 13px 15px;">
                <a href="http://www.layui.com/admin/std/dist/views/" target="_blank" class="fly-zanzhu" time-limit="2017.09.25-2099.01.01" style="background-color: #20222A; color: #fff;">layui 官方出品的通用后台管理模板</a>
                <a href="/jie/15697/" target="_blank" rel="nofollow" class="fly-zanzhu" style="background-color: #f2f2f2; color: #333;">广告位虚席以待</a></div>
        </div>
        <div class="fly-panel fly-rank fly-rank-reply" id="LAY_replyRank">
            <h3 class="fly-panel-title">回贴周榜</h3>
            <dl>
                <?php if(is_array($weekTop) || $weekTop instanceof \think\Collection || $weekTop instanceof \think\Paginator): $i = 0; $__LIST__ = $weekTop;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$row): $mod = ($i % 2 );++$i;?>
                <dd>
                    <a href="<?php echo url('index/user/home',['uid'=>$row['uid']]); ?>">
                        <img src="/<?php echo $row['face']; ?>"><cite><?php echo $row['nickname']; ?></cite>
                        <i><?php echo $row['cn']; ?>次回答</i>
                    </a>
                </dd>
                <?php endforeach; endif; else: echo "" ;endif; ?>
            </dl>
        </div>
        <dl class="fly-panel fly-list-one">
    <dt class="fly-panel-title">本周热议</dt>
    <?php if(is_array($hotQues) || $hotQues instanceof \think\Collection || $hotQues instanceof \think\Paginator): $i = 0; $__LIST__ = $hotQues;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$row): $mod = ($i % 2 );++$i;?>
    <dd>
        <a href="<?php echo url('index/jie/index',['qid'=>$row['qid']]); ?>"><?php echo $row['title']; ?></a>
        <span>
            <i class="iconfont icon-pinglun1"></i><?php echo $row['reply_num']; ?></span>
    </dd>
    <?php endforeach; endif; else: echo "" ;endif; ?>
</dl>
        <div class="fly-panel">
            <div class="fly-panel-title">官方产品</div>
            <div class="fly-panel-main">
                <a href="http://www.layui.com/admin/?from=fly" target="_blank" class="fly-zanzhu" time-limit="2017.09.25-2099.01.01" style="background-color: #20222A;">layuiAdmin - layui 官方后台管理模板</a>
                <a href="http://layim.layui.com/?from=fly" target="_blank" class="fly-zanzhu" time-limit="2017.09.25-2099.01.01" style="background-color: #009688;">LayIM - layui 即时通讯旗舰之作</a></div>
        </div>
        <div class="fly-panel" style="padding: 20px 0; text-align: center;">
            <img src="//cdn.layui.com/upload/2017_8/168_1501894831075_19619.jpg" style="max-width: 100%;" alt="layui">
            <p style="position: relative; color: #666;">微信扫码关注 layui 公众号</p></div>
        <div class="fly-panel fly-link">
            <h3 class="fly-panel-title">友情链接</h3>
        </div>
    </div>
</div>
</div>

<script type="text/javascript">
    layui.use('form', function(){
      var form = layui.form;
      
        $('#LAY_signin').click(function(){
            $.get('<?php echo url('index/index/sign'); ?>', function(res) {
                if(res.code==1){

                    layer.msg(res.msg, function(){
                        location.reload();
                    });
                }else{
                    layer.msg(res.msg, function(){});
                }
            },'json');
        })

        $('#LAY_signinHelp').click(function(event) {
            layer.open({
              type: 1,
              title:'签到说明',
              shadeClose: true, 
              shade: 0.8,
              skin: 'layui-layer-rim', //加上边框
              content: $('#help').html()
            });
        });

         $('#LAY_signinTop').click(function(event) {

            layer.open({
              type: 2,
              title: 'layer mobile页',
              shadeClose: true,
              shade: 0.8,
              content: 'http://www.baidu.com' //iframe的url
            }); 
            // layer.open({
            //   type: 1,
            //   title:'签到说明',
            //   shadeClose: true, 
            //   skin: 'layui-layer-rim', //加上边框
            //   content: $('#top').html()
            // });
        });
    })
</script>
<script type="text/html" id="top">
    <div class="layui-tab layui-tab-brief" style="margin: 5px 0 0;">
    <ul class="layui-tab-title">
        <li class="layui-this">最新签到</li>
        <li>今日最快</li>
        <li>总签到榜</li></ul>
    <div class="layui-tab-content fly-signin-list" id="LAY_signin_list">
        <ul class="layui-tab-item layui-show">
            <li>
                <a href="/u/19738152" target="_blank">
                    <img src="//res.layui.com/images/fly/avatar/0.jpg">
                    <cite class="fly-link">管仓宝网络科技</cite></a>
                <span class="fly-grey">签到于 17:29:05</span>
            </li>
        </ul>
         <ul class="layui-tab-item">
            <li>
                <a href="/u/10133424" target="_blank">
                    <img src="//res.layui.com/images/fly/avatar/1.jpg">
                    <cite class="fly-link">我爱贤心</cite></a>
                <span class="fly-grey">签到于 00:00:01</span>
            </li>
        </ul>

        <ul class="layui-tab-item">
            <li>
                <a href="/u/3226440" target="_blank">
                    <img src="http://q.qlogo.cn/qqapp/101235792/3C039374444019CF9C93F6AA00D5A66E/100">
                    <cite class="fly-link">志远有18CM</cite></a>
                <span class="fly-grey">已连续签到
                    <i>282</i>天</span>
            </li>
        </ul>
    </div>
</div>
</script>
<script type="text/html" id="help">
    <div class="layui-text" style="padding: 20px;">
      <blockquote class="layui-elem-quote">“签到”可获得社区飞吻，规则如下</blockquote>
      <table class="layui-table">
        <thead>
          <tr>
            <th>连续签到天数</th>
            <th>每天可获飞吻</th></tr>
        </thead>
        <tbody>
          <tr>
            <td>＜5</td>
            <td>5</td></tr>
          <tr>
            <td>≥5</td>
            <td>10</td></tr>
          <tr>
            <td>≥15</td>
            <td>15</td></tr>
          <tr>
            <td>≥30</td>
            <td>20</td></tr>
          <tr>
            <td>≥100</td>
            <td>30</td></tr>
          <tr>
            <td>≥365</td>
            <td>50</td></tr>
        </tbody>
      </table>
      <ul style="padding-top: 0; padding-bottom: 0;">
        <li>中间若有间隔，则连续天数重新计算</li>
        <li style="color: #FF5722;">不可利用程序自动签到，否则飞吻清零</li></ul>
    </div>

</script>
<script type="text/javascript" src="https://res.wx.qq.com/open/js/jweixin-1.3.2.js"></script>

       
        <div class="fly-footer">
            <p>
                <a href="http://fly.layui.com/">Fly社区</a>2018 &copy;
                <a href="http://www.layui.com/">layui.com</a></p>
            <p>
                <a href="http://fly.layui.com/jie/3147/" target="_blank">付费计划</a>
                <a href="/case/2018/" target="_blank">Layui案例</a>
                <a href="http://www.layui.com/template/fly/" target="_blank">获取Fly社区模版</a>
                <a href="http://fly.layui.com/jie/2461/" target="_blank">微信公众号</a></p>
            <p class="fly-union">
                <a href="https://www.upyun.com?from=layui" target="_blank" rel="nofollow" upyun>
                    <img src="//res.layui.com/static/images/other/upyun.png?t=1"></a>
                <span>提供 CDN 赞助</span></p>
        </div>
    </body>
    <script>
    //注意：导航 依赖 element 模块，否则无法进行功能性操作
    layui.use('element', function(){
      var element = layui.element;
      
      //…
    });
    </script>

</html>